]> dgit.raspbian.org Git - gnome-shell.git/commit
dbusServices/extensions: Fix shutdown after showing prefs
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 28 Oct 2021 17:27:57 +0000 (19:27 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 2 Nov 2021 14:39:08 +0000 (15:39 +0100)
commit1297d8dc30ea2f62b0849266d84d1749a599ee28
treec69d4a06902edff5a71b72a4874b70344e64c7e3
parentfd60591bb3d1b5cf31e7ce735a52ced23d531fa1
dbusServices/extensions: Fix shutdown after showing prefs

GTK4 relies entirely on refcounting for cleanup (that is,
there is no longer a destroy() method that forces a dispose
run regardless of the refcount).

Unfortunately that makes cleanup harder in (some) language
bindings, where an object may be kept alive implicitly by
closures etc.

Address this by releasing the hold count when the window
is closed rather than when it is destroyed.

This isn't the most elegant, but it ensure that the service
doesn't get stuck if an extension doesn't carefully clean
up everything in its prefs widget.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4564

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2013>
(cherry picked from commit 4d2b008966266ed96325dfd2cf7ebe41902aa270)
js/dbusServices/extensions/extensionsService.js